<?php
class imgAddAction extends rareAction{
	public function execute(){
		$id = $this->getGetParam('id',0);
		if($id!=0){
			$this->assign('albumID',$id);
		}
	}
	public function executePost(){
		$albumID = $this->getPostParam('albumID',0);
		if($albumID!=0){
			$images = $this->getPostParam('img',array());
			if(!empty($images)){
				service_image::insert($images,service_type::ALBUM,$albumID);
			}
			jsonReturn(1,'ok');
		}
		jsonReturn(0,'fail');
	}
}
?>
